WPS 加载项开发 > 加载项 API 参考 > 系统环境 > Env 对象成员

Env 对象主要用于取系统环境基本信息,这个对象目前提供了取用户目录、临时目录等相关信息,后续可能会根据实际需求不断扩充。

方法

名称 说明
GetTempPath 取系统临时目录的路径。
GetRootPath 取系统根目录的路径。
GetHomePath 取系统HOME目录的路径,代表当前用户主目录。
GetAppDataPath 取系统%AppData%/Roming目录的路径,仅Windows平台适用。
GetProgramFilesPath 取系统ProgramFiles目录的路径,仅Windows平台适用。
GetProgramDataPath 取系统ProgramData目录的路径,仅windows平台适用。
GetDesktopDpi 取系统DPI。